﻿@model MVCMongo.Models.LoginViewModel
@{
    ViewBag.Title = "RegisterWithContact";
}

<div class="block-title">

    <h2>@ViewBag.Header</h2>
</div>

<div class="block-content">
    <div id="writecomment">
        @using (Html.BeginForm("LoginPost","Account",new { ReturnUrl = ViewBag.ReturnUrl }))
        {
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true)
            @Html.HiddenFor(x => x.LoginModel.Provider)
             @Html.HiddenFor(x => x.LoginModel.UserName)





            @*<p class="contact-form-user">
                @Html.LabelFor(m => m.LoginModel.UserName)
                @Html.EditorFor(m => m.LoginModel.UserName)
                @Html.ValidationMessageFor(m => m.LoginModel.UserName)

            </p>*@
            <p class="contact-form-user">
              Create your password to login
                @Html.PasswordFor(m => m.LoginModel.Password)
                @Html.ValidationMessageFor(m => m.LoginModel.Password)
            </p>
            <p class="contact-form-user">
                @Html.TextBoxFor(m => m.LoginModel.FirstName)
                @Html.LabelFor(m => m.LoginModel.FirstName)
            </p>
            <p class="contact-form-user">
                @Html.TextBoxFor(m => m.LoginModel.LastName)
                @Html.LabelFor(m => m.LoginModel.LastName)
            </p>


    <div style="display: none">


        <p>You have below contacts in Gmail ID</p>
        <table>
            <tr>
                <td>S.No</td>
                <td>Name</td>
                <td>Email</td>
            </tr>
            @{
            int i = 1;
            }
            @foreach (var item in Model.ContactDetails.Where(x=>!string.IsNullOrEmpty(x.EmailAddress1)))
                {
                <tr>
                    <td>
                        @i
                    </td>
                    <td>@item.Name</td>
                    <td>
                        @item.EmailAddress1
                       <input type="hidden" name="EmailAddress" value="@item.EmailAddress1"/>
                    </td>
                </tr>
                    i++;
                }

        </table>
    </div>

            <input type="submit" value="Register" />
        }

        
    </div>

</div>